(function() {
    CKEDITOR.plugins.add('myfilter', {
        requires: ['button'],
        init: function(a) {
            a.addCommand('myfilter', CKEDITOR.plugins.myfilter.commands.myfilter);
            a.ui.addButton('myfilter', {
                label: "滤",
                command: 'myfilter',
                icon: this.path + "lv.png"//这个g.ico是你的插件图标，放在同目录下
            });
        }
    });
    CKEDITOR.plugins.myfilter = {
        commands: {
            myfilter: {
                exec: function(a) {
                    var _html = a.getData();
                    	_html = _html.replace(/<(?:a|\/a).*?>/ig, '');
                       a.setData(_html);
                }
            }
        }
    };
})();
